﻿package com.wiegand.util {	import flash.display.BitmapData;	import flash.display.Sprite;	public class BackgroundPattern extends Sprite {		private var _template : Sprite;		private var _patter : BitmapData;		public function BackgroundPattern( template : Sprite, tile : Sprite ) {			_template = template;							_patter = new BitmapData( tile.width, tile.height );			_patter.draw( tile );					updateTiles();		}				public function resizeHandler():void {				updateTiles();		}				private function updateTiles():void{			graphics.clear();			graphics.beginBitmapFill(_patter);			graphics.drawRect(0, 0, _template.width, _template.height);			graphics.endFill();		}		}}